package example;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class Bla {
	
	public static void main(String[] args) {
	
		String[] pei = new String[0];
		
		List l = new ArrayList();
		Collection c = new ArrayList();
		
		
		try {
			Class<?> classe = Class.forName(pei.getClass().getName());
			
			System.out.println("Classe: "+classe.getName());
						
			Object o = null;
			
			if(classe.isArray()){
				System.out.println("array::"+classe.getComponentType().getName());				
				o = Array.newInstance(classe.getComponentType(), 0);
				System.out.println("array2:"+o);
				System.out.println("array3:"+o.getClass());
				System.out.println("array3:"+o.getClass().getName());
				System.out.println("array3:"+o.getClass().getComponentType());
				System.out.println("array3:"+o.getClass().getComponentType().getName());
			}
			
			//System.out.println(v1.toString());
			
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalArgumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
	}

}
